package com.tfjybj.itoo.exam.provider.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tfjybj.itoo.exam.entity.TrainingProgramsEntity;
import com.tfjybj.itoo.exam.model.TrainingProgramsModel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * TrainingProgramsDao接口
 * trainingPrograms表
 *
 * @author 杨江涛
 * @version 2.0.0
 * @since 2.0.0 2018-11-15 10:35:56
 */
@Repository("trainingProgramsDao")
public interface TrainingProgramsDao extends BaseMapper<TrainingProgramsEntity> {
	
	//region 模板生成：模糊查询
	/**
     * 根据课程_id模糊查询trainingPrograms
     *
     * @param courseId  课程_id
     * @return 模糊查询的trainingPrograms集合
     * @author 杨江涛
     * @since 2.0.0 2018-11-15 10:35:56
     */
    List<TrainingProgramsEntity> queryLikeCourseId(@Param("courseId") String courseId);

    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    /**
     * 无参查询当前学年的课程id
     * @param trainingProgramsEntity trainingProgramsEntity
     * @return 当前学年的trainingPrograms集合
     * @author 杨江涛
     * @since 2.0.0 2018-11-24 19:12:58
     */
    List<TrainingProgramsEntity> findCourseId(TrainingProgramsEntity trainingProgramsEntity);

    /**
     * 根据专业id查询当前学年课程(与course表联表查询)
     *
     * @param professionId 专业id
     * @param semester 学年学期id
     * @return 当前学年课程信息
     * @author 杨江涛
     * @since 2.0.0 2018-12-4 14:41:59
     */
    List<TrainingProgramsModel> findCourseByProfessionId(@Param("professionId") String professionId, @Param("semester") String semester);
}
